package com.mmc.web.controller.sys;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mmc.domain.sys.SysUser;
import com.mmc.service.sys.SysUserService;
import com.mmc.web.controller.base.BaseController;

@Controller
@RequestMapping("/sysUser")
public class SysUserController extends BaseController{
	
	@Autowired
	private SysUserService userService;
	/**
	 * 跳转到登录页面
	 * @return
	 */
	@RequestMapping("/adminList.action")
	public String adminList(){
		List<SysUser> users = userService.getAllUser();
		model.addAttribute("datas", users);
		return "/admin-list.jsp";
	}
	/**
	 * 跳转到登录页面
	 * @return
	 */
	@RequestMapping("/adminAdd.action")
	public String adminAdd(){
		return "/admin-add.jsp";
	}
	/**
	 * 跳转到登录页面
	 * @return
	 */
	@RequestMapping("/adminSave.action")
	public String adminSave(){
		return "/admin-list.jsp";
	}
}
